<div id='titleHead'>	
  <h1>Transition Mode ID = <%= @mode.id %></h1>
</div>
<div class='documentation'>		
  Here an detailed overview over the transition mode is given
</div>
<div class='container'>
  <h3>Execution Container</h3>
  <pre>    ID: <%= @mode.execution_container_id %>
    Type: <%= @mode.execution_container_type %></pre>
  <h3>Transition = <%= @mode.transition.name || @mode.transition.id %>  </h3>
  <h3>Preceding Modes IDs: <%= @mode.get_preceding_modes.collect{|m| m.id}.join(',') %></h3>

  <h3>Input Tokens</h3>
  <% @mode.input_tokens.each do |token| %>
    <div class='innerContainer'>
      <div>
        <% token = PNEngine::Token.find(token.id) #dirty fix for weird activerecord bug%>
        <%= "Token #{token.id} is case #{token.case.id}, active = #{token.is_active} and created by mode #{token.transition_mode_id}" %>
        <pre style="border: 1px solid black;" ><![CDATA[<%= token.value %>]]></pre>
      </div>
    </div>
  <% end %>

  <h3>Output Tokens</h3>
  <% @mode.output_tokens.each do |token| %>
    <div class='innerContainer'>
      <div>
        <%= "Token #{token.id} is case #{token.case.id}, active = #{token.is_active} and created by mode #{token.transition_mode_id}" %>
        <pre style="border: 1px solid black;" ><![CDATA[<%= token.value %>]]></pre>
      </div>
      <%= "Modes depending on this token: #{token.depending_transition_modes.collect{|mode| mode.id}.join(',')}" %>
    </div>
  <% end %>
</div>
<div class='container'>
  <h3>Transition Mode Actions</h3>
  <%  if Merb::Config[:use_reevaluation] %>
    <form action="<%= "transition_modes/#{@mode.id}/undo" %>" method="post">
      <input <% if !@mode.undo_possible? %>disabled="disabled"<% end %> value="Undo" type="submit"/>
    </form>
    <form action="<%= "transition_modes/#{@mode.id}/redo" %>" method="post">
      <input <% if !@mode.redo_possible? %>disabled="disabled"<% end %> value="Redo" type="submit"/>
    </form>
  <% else %>
    Sorry, can't undo/redo, because re-evaluation functionality is turned off!
  <% end %>
</div>